import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'main',
    component: () => import('../views/Login.vue')
  },

  {
    path: '/main',
    name: 'main',
    component: () => import('../views/Main.vue'),
    children:[
      {
        path: 'dept',
        name: 'dept',
        component: () => import('../views/DeptView.vue')
      },  
      {
        path: 'emp',
        name: 'emp',
        component: () => import('../views/EmpView.vue')
      }, 
      {
        path: 'knowledge',
        name: 'knowledge',
        component: () => import('../views/KnowledgeView.vue')
      },
      {
        path: 'aichat',
        name: 'aichat',
        component: () => import('../views/AichatView.vue')
      },
      {
        path: 'statistic',
        name: 'statistic',
        component: () => import('../views/StatisticView.vue')
      },
      {
        path: 'TermFreq',
        name: 'TermFreq',
        component: () => import('../views/TermfreqView.vue')
      },
      {
        path: 'TermFreqMap',
        name: 'TermFreqMap',
        component: () => import('../views/TermfreqmapView.vue')
      },
      {
        path: 'position',
        name: 'position',
        component: () => import('../views/PositionView.vue')
      },

    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue')
  },
  
]

const router = new VueRouter({
  routes
})

export default router
